

import uuid

# 生成一个UUID
generated_uuid = uuid.uuid4()

# 将UUID转换为十六进制字符串
hex_string = generated_uuid.hex

print("生成的UUID:", generated_uuid)
print("对应的十六进制字符串:", hex_string)
print("十六进制字符串的位数:", len(hex_string) * 4)  # 计算位数